package newcrunch.typography;

import java.util.Comparator;

/**
 * @author WL
 */
public class TypoDetailsComparator implements Comparator
{
    public int compare(Object o1, Object o2) 
    {
        try {
            long first = Long.parseLong(o1.toString());
            long second = Long.parseLong(o2.toString());
            return first < second ? -1 : (first == second ? 0 : 1);
        } catch (Exception e) {
            return o1.toString().compareTo(o2.toString());
        }
    }
    
}
